window.Interface = {
  challengeNum:function(postDate,cb){
    cb({//游戏game,理财 finance,生活life，健康healthy，育儿child,娱乐fun
      open:true,
      game:5,
      finance:3,
      life:2,
      healthy:2,
      child:1,
      fun:3
    })
  },
  

  challengeResults:function(postDate,cb){
    cb({
      type:"success",//擂主challenger，过关success,失败fail
      rank:4455,
      isSend:true
    })
  },
  // disportResults:function(postDate,cb){
  //   cb({
  //     type:"success",
  //     rank:4455
  //   })
  // },
  
  // healthResults:function(postDate,cb){
  //   cb({
  //     type:"success",
  //     rank:4455
  //   })
  // },

  // lifeResults:function(postDate,cb){
  //   cb({
  //     type:"success",
  //     rank:4455
  //   })
  // },

  // moneyResults:function(postDate,cb){
  //   cb({
  //     type:"success",
  //     rank:4455
  //   })
  // },

  // parentingResults:function(postDate,cb){
  //   cb({
  //     type:"success",
  //     rank:4455
  //   })
  // },
  // gameResults:function(postDate,cb){
  //   cb({
  //     type:"success",
  //     rank:4455
  //   })
  // },


  shareUrl:function(postDate,cb){
    cb({
      url:"http://www.pingan.com"
    })
  },
  // myAccount:function(postDate,cb){
  //   cb({
  //     name:"nana^_^",
  //     rank:"3456",
  //     score:20,
  //     showChallenger:false
  //   })
  // },




  rankData:function(postDate,cb){
    //游戏game,理财finance,生活life，健康healthy，育儿child,娱乐fun
    //console.log(postDate.starType);
    var s;
    console.log(postDate.isLastWeek);

    if(postDate.isLastWeek==="N"){
      s = "当前"
    }else{
      s = "上周"
    }
    var a = postDate.starType;


    cb({
      challengerIsMy:true,//擂主是否当前用户
      curIsChallengerNum:false,//当前用户是否三次擂主
      week:2,//活动进行第几周
      
      myRanking:{//个人信息
        "KEY":"13800138000",//手机号
        "nickName":"nana^_^",//昵称
        "INDEX":"1",//排名
        "SCORE":"20"//分数
      },
      "challenger":{//擂主信息
        "KEY":"0",//手机号
        "nickName":"叮当猫",//昵称
        "INDEX":"1",//排名
        "SCORE":"36.45827",//分数
        "headImgUrl":"images/rank/head.png"//擂主头像
      },
      rankingList: [
        {px:1,name:"1平原和水"+s+a,score:45.4356},
        {px:2,name:"鱼的假想敌",score:43.2358},
        {px:3,name:"RUDY",score:32.45},
        {px:4,name:"Kekery",score:30.2145},
        {px:5,name:"无印良品",score:28.3468},
        {px:6,name:"小小鱼",score:25.34},
        {px:7,name:"天清气朗",score:20},
        {px:8,name:"小鱼儿喵",score:20},
        {px:9,name:"平原和水",score:20},
        {px:10,name:"平原和水",score:20},
      ]
    })
  },
  rankLastData:function(postDate,cb){
    //游戏game,理财finance,生活life，健康healthy，育儿child,娱乐fun
    //console.log(postDate.starType);
    cb({
      challengerIsMy:true,//擂主是否当前用户
      curIsChallengerNum:false,//当前用户是否三次擂主
      week:1,//活动进行第几周
      myRanking:{//个人信息
        "KEY":"13800138000",//手机号
        "nickName":"nana^_^",//昵称
        "INDEX":"1",//排名
        "SCORE":"20"//分数
      },
      "challenger":{//擂主信息
        "KEY":"",//手机号
        "nickName":"叮当猫",//昵称
        "INDEX":"1",//排名
        "SCORE":"36.45827",//分数
        "headImgUrl":"images/rank/head.png"//擂主头像
      },
      rankingList: [
        {px:1,name:"L平原和水",score:45.4356},
        {px:2,name:"鱼的假想敌",score:43.2358},
        {px:3,name:"RUDY",score:32.45},
        {px:4,name:"Kekery",score:30.2145},
        {px:5,name:"无印良品",score:28.3468},
        {px:6,name:"小小鱼",score:25.34},
        {px:7,name:"天清气朗",score:20},
        {px:8,name:"小鱼儿喵",score:20},
        {px:9,name:"平原和水",score:20},
        {px:10,name:"平原和水",score:20},
      ]
    })
  },


  // lastchampion:function(postDate,cb){
  //   cb(
  //     {
  //     name:"叮当猫",
  //     score:"36.4587",
  //     headimg:"images/rank/head.png"
  //   }
  //   )
  // },


  luckyNum:function(postDate,cb){
    cb({
      luckyNum:3,
    })
  },
  luckyNumRes:function(postDate,cb){
    cb({
      luckyRes:2,//1实物，2红包
      luckyNum:0,
      isPrize:true,
      prizeFee:"1.58"
    })
  },

  chanceList:function(postDate,cb){
    cb({
      chanceList:[
        {type:"challenge",tit:"挑战过关抽奖机会",date:"2017-04-12",no:"147836289654",desc:"游戏星球挑战成功，获得一次抽奖机会"},
        {type:"gold",tit:"金币过关抽奖机会",date:"2017-04-12",no:"147836289654",desc:"集齐五枚金币，获得一次抽奖机会"},
        {type:"share",tit:"转发过关抽奖机会",date:"2017-04-12",no:"147836289654",desc:"分享战绩至微信，获得一次抽奖机会"},
        {type:"challenge",tit:"挑战过关抽奖机会",date:"2017-04-12",no:"147836289654",desc:"娱乐星球挑战成功，获得一次抽奖机会"},
        {type:"share",tit:"转发过关抽奖机会",date:"2017-04-12",no:"147836289654",desc:"分享战绩至微信，获得一次抽奖机会"},
        {type:"share",tit:"转发过关抽奖机会",date:"2017-04-12",no:"147836289654",desc:"分享战绩至微信，获得一次抽奖机会"}
      ]
    })
  },
  lastDate:function(postDate,cb){
    cb({
      date:"2017,05,17"//注意此处时间月份要减一个月
    })
  },

  toMyPrize:function(){
    
  }






 };
